//
//  DYFlowLayout.m
//  图片浏览器
//
//  Created by mac on 16/11/16.
//  Copyright © 2016年 DeYi. All rights reserved.
//

#import "DYFlowLayout.h"

@implementation DYFlowLayout

- (void)prepareLayout {
    [super prepareLayout];
    CGFloat margin = 10;
    CGFloat cols = 3;
    CGFloat itemW = (LHScreenW - 4 * margin) / cols;
    self.minimumLineSpacing = margin;
    self.minimumInteritemSpacing = margin;
    self.itemSize = CGSizeMake(itemW, itemW);
    self.collectionView.contentInset = UIEdgeInsetsMake(margin + 64, margin, 0, margin);
}
@end
